package java9_7;

import java.util.Arrays;
import java.util.Scanner;

public class Test_3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入作业名称");
        String a = in.next();
        char[] chars = a.toCharArray();
       /* String []arr=new String[10];
        System.arraycopy(chars,0,arr,0,chars.length-4);
        String a1= Arrays.toString(arr);*/
        String a1 = a.substring(0, chars.length - 4);
        char[]chars1=a1.toCharArray();
        if (a.endsWith("zip") || a.endsWith("rar")) {
            boolean p=true;
            for (int i = 0; i < chars1.length; i++) {
                    if (chars1[i]>0x9fa5||chars1[i]<0x4e00){
                        p=false;
                    }
                    if (p==true){
                        System.out.println("正确");
                        break;
                    }else{
                        System.out.println("错误");
                        break;
                    }
            }
        }
    }
}